import request from '@/utils/request'

// 查询历史信息列表
export function listHistoryInfo(query) {
  return request({
    url: '/system/historyInfo/list',
    method: 'get',
    params: query
  })
}

// 查询历史信息详细
export function getHistoryInfo(historyInfoId) {
  return request({
    url: '/system/historyInfo/' + historyInfoId,
    method: 'get'
  })
}

// 新增历史信息
export function addHistoryInfo(data) {
  return request({
    url: '/system/historyInfo',
    method: 'post',
    data: data
  })
}

// 修改历史信息
export function updateHistoryInfo(data) {
  return request({
    url: '/system/historyInfo',
    method: 'put',
    data: data
  })
}

// 删除历史信息
export function delHistoryInfo(historyInfoId) {
  return request({
    url: '/system/historyInfo/' + historyInfoId,
    method: 'delete'
  })
}

//调用算法检测
export function detect(data){
  return request({
    url: '/system/historyInfo/detect',
    method: 'post',
    data: data
  })
}

//获取检测类别统计数据
export function detectTypeInfo(){
  return request({
    url: '/system/historyInfo/detectTypeInfo',
    method: 'get'
  })
}

//获取上周检测次数数据
export function detectNum(){
  return request({
    url: '/system/historyInfo/detectNum',
    method: 'get'
  })
}
